home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mint96sb.zoo / src / file.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-10  |  16.6 KB  |  519 lines

  1. /*
  2. Copyright 1991,1992 Eric R. Smith. All rights reserved.
  3. */
  4.  
  5. #ifndef _filesys_h
  6. #define _filesys_h
  7.  
  8. struct filesys;        /* forward declaration */
  9. struct devdrv;        /* ditto */
  10.  
  11. typedef struct f_cookie {
  12.     struct filesys *fs;    /* filesystem that knows about this cookie */
  13.     ushort    dev;        /* device info (e.g. Rwabs device number) */
  14.     ushort    aux;        /* extra data that the file system may want */
  15.     long    index;        /* this+dev uniquely identifies a file */
  16. } fcookie;
  17.  
  18. #define TOS_NAMELEN 13
  19.  
  20. typedef struct dtabuf {
  21.     short    index;        /* index into arrays in the PROC struct */
  22.     long    magic;
  23. #define SVALID    0x1234fedcL    /* magic for a valid search */
  24. #define EVALID    0x5678ba90L    /* magic for an exhausted search */
  25.  
  26.     char    dta_pat[TOS_NAMELEN+1];    /* pointer to pattern, if necessary */
  27.     char    dta_sattrib;    /* attributes being searched for */
  28. /* this stuff is returned to the user */
  29.     char    dta_attrib;
  30.     short    dta_time;
  31.     short    dta_date;
  32.     long    dta_size;
  33.     char    dta_name[TOS_NAMELEN];
  34. } DTABUF;
  35.  
  36. /* structure for opendir/readdir/closedir */
  37. typedef struct dirstruct {
  38.     fcookie fc;        /* cookie for this directory */
  39.     ushort    index;        /* index of the current entry */
  40.     ushort    flags;        /* flags (e.g. tos or not) */
  41. #define TOS_SEARCH    0x01
  42.     char    fsstuff[60];    /* anything else the file system wants */
  43.                 /* NOTE: this must be at least 45 bytes */
  44. } DIR;
  45.  
  46. /* structure for getxattr */
  47. typedef struct xattr {
  48.     ushort    mode;
  49. /* file types */
  50. #define S_IFMT    0170000        /* mask to select file type */
  51. #define S_IFCHR    0020000        /* BIOS special file */
  52. #define S_IFDIR    0040000        /* directory file */
  53. #define S_IFREG 0100000        /* regular file */
  54. #define S_IFIFO 0120000        /* FIFO */
  55. #define S_IMEM    0140000        /* memory region or process */
  56. #define S_IFLNK    0160000        /* symbolic link */
  57.  
  58. /* special bits: setuid, setgid, sticky bit */
  59. #define S_ISUID    04000
  60. #define S_ISGID 02000
  61. #define S_ISVTX    01000
  62.  
  63. /* file access modes for user, group, and other*/
  64. #define S_IRUSR    0400
  65. #define S_IWUSR 0200
  66. #define S_IXUSR 0100
  67. #define S_IRGRP 0040
  68. #define S_IWGRP    0020
  69. #define S_IXGRP    0010
  70. #define S_IROTH    0004
  71. #define S_IWOTH    0002
  72. #define S_IXOTH    0001
  73. #define DEFAULT_DIRMODE (0777)
  74. #define DEFAULT_MODE    (0666)
  75.     long    index;
  76.     ushort    dev;
  77.     ushort    reserved1;
  78.     ushort    nlink;
  79.     ushort    uid;
  80.     ushort    gid;
  81.     long    size;
  82.     long    blksize;
  83.     long    nblocks;
  84.     short    mtime, mdate;
  85.     short    atime, adate;
  86.     short    ctime, cdate;
  87.     short    attr;
  88. /* defines for TOS attribute bytes */
  89. #ifndef FA_RDONLY
  90. #define           FA_RDONLY           0x01
  91. #define           FA_HIDDEN           0x02
  92. #define           FA_SYSTEM           0x04
  93. #define           FA_LABEL               0x08
  94. #define           FA_DIR               0x10
  95. #define           FA_CHANGED           0x20
  96. #endif
  97.     short    reserved2;
  98.     long    reserved3[2];
  99. } XATTR;
  100.  
  101. typedef struct fileptr {
  102.     short    links;        /* number of copies of this descriptor */
  103.     ushort    flags;        /* file open mode and other file flags */
  104.     long    pos;        /* position in file */
  105.     long    devinfo;    /* device driver specific info */
  106.     fcookie    fc;        /* file system cookie for this file */
  107.     struct devdrv *dev; /* device driver that knows how to deal with this */
  108.     struct fileptr *next; /* link to next fileptr for this file */
  109. } FILEPTR;
  110.  
  111. struct flock {
  112.     short l_type;            /* type of lock */
  113. #define F_RDLCK        0
  114. #define F_WRLCK        1
  115. #define F_UNLCK        3
  116.     short l_whence;            /* SEEK_SET, SEEK_CUR, SEEK_END */
  117.     long l_start;            /* start of locked region */
  118.     long l_len;            /* length of locked region */
  119.     short l_pid;            /* pid of locking process
  120.                         (F_GETLK only) */
  121. };
  122.  
  123. /* structure for internal kernel locks */
  124. typedef struct ilock {
  125.     struct flock l;        /* the actual lock */
  126.     struct ilock *next;    /* next lock in the list */
  127.     long    reserved[4];    /* reserved for future expansion */
  128. } LOCK;
  129.  
  130. typedef struct devdrv {
  131.     long ARGS_ON_STACK (*open)    P_((FILEPTR *f));
  132.     long ARGS_ON_STACK (*write)    P_((FILEPTR *f, const char *buf, long bytes));
  133.     long ARGS_ON_STACK (*read)    P_((FILEPTR *f, char *buf, long bytes));
  134.     long ARGS_ON_STACK (*lseek)    P_((FILEPTR *f, long where, int whence));
  135.     long ARGS_ON_STACK (*ioctl)    P_((FILEPTR *f, int mode, void *buf));
  136.     long ARGS_ON_STACK (*datime)    P_((FILEPTR *f, short *timeptr, int rwflag));
  137.     long ARGS_ON_STACK (*close)    P_((FILEPTR *f, int pid));
  138.     long ARGS_ON_STACK (*select)    P_((FILEPTR *f, long proc, int mode));
  139.     void ARGS_ON_STACK (*unselect) P_((FILEPTR *f, long proc, int mode));
  140. } DEVDRV;
  141.  
  142. typedef struct filesys {
  143.     struct    filesys    *next;    /* link to next file system on chain */
  144.     long    fsflags;
  145. #define FS_KNOPARSE    0x01    /* kernel shouldn't do parsing */
  146. #define FS_CASESENSITIVE    0x02    /* file names are case sensitive */
  147. #define FS_NOXBIT    0x04    /* if a file can be read, it can be executed */
  148.  
  149.     long    ARGS_ON_STACK (*root) P_((int drv, fcookie *fc));
  150.     long    ARGS_ON_STACK (*lookup) P_((fcookie *dir, const char *name, fcookie *fc));
  151.     long    ARGS_ON_STACK (*creat) P_((fcookie *dir, const char *name, unsigned mode,
  152.                 int attrib, fcookie *fc));
  153.     DEVDRV * ARGS_ON_STACK (*getdev) P_((fcookie *fc, long *devspecial));
  154.     long    ARGS_ON_STACK (*getxattr) P_((fcookie *file, XATTR *xattr));
  155.     long    ARGS_ON_STACK (*chattr) P_((fcookie *file, int attr));
  156.     long    ARGS_ON_STACK (*chown) P_((fcookie *file, int uid, int gid));
  157.     long    ARGS_ON_STACK (*chmode) P_((fcookie *file, unsigned mode));
  158.     long    ARGS_ON_STACK (*mkdir) P_((fcookie *dir, const char *name, unsigned mode));
  159.     long    ARGS_ON_STACK (*rmdir) P_((fcookie *dir, const char *name));
  160.     long    ARGS_ON_STACK (*remove) P_((fcookie *dir, const char *name));
  161.     long    ARGS_ON_STACK (*getname) P_((fcookie *relto, fcookie *dir, char *pathname));
  162.     long    ARGS_ON_STACK (*rename) P_((fcookie *olddir, char *oldname,
  163.                 fcookie *newdir, const char *newname));
  164.     long    ARGS_ON_STACK (*opendir) P_((DIR *dirh, int tosflag));
  165.     long    ARGS_ON_STACK (*readdir) P_((DIR *dirh, char *name, int namelen, fcookie *fc));
  166.     long    ARGS_ON_STACK (*rewinddir) P_((DIR *dirh));
  167.     long    ARGS_ON_STACK (*closedir) P_((DIR *dirh));
  168.     long    ARGS_ON_STACK (*pathconf) P_((fcookie *dir, int which));
  169.     long    ARGS_ON_STACK (*dfree) P_((fcookie *dir, long *buf));
  170.     long    ARGS_ON_STACK (*writelabel) P_((fcookie *dir, const char *name));
  171.     long    ARGS_ON_STACK (*readlabel) P_((fcookie *dir, char *name, int namelen));
  172.     long    ARGS_ON_STACK (*symlink) P_((fcookie *dir, const char *name, const char *to));
  173.     long    ARGS_ON_STACK (*readlink) P_((fcookie *dir, char *buf, int len));
  174.     long    ARGS_ON_STACK (*hardlink) P_((fcookie *fromdir, const char *fromname,
  175.                 fcookie *todir, const char *toname));
  176.     long    ARGS_ON_STACK (*fscntl) P_((fcookie *dir, const char *name, int cmd, long arg));
  177.     long    ARGS_ON_STACK (*dskchng) P_((int drv));
  178.     long    zero;
  179. } FILESYS;
  180.  
  181. /*
  182.  * this is the structure passed to loaded file systems to tell them
  183.  * about the kernel
  184.  */
  185.  
  186. struct kerinfo {
  187.     short    maj_version;    /* kernel version number */
  188.     short    min_version;    /* minor kernel version number */
  189.     ushort    default_perm;    /* default file permissions */
  190.     short    reserved1;    /* room for expansion */
  191.  
  192. /* OS functions */
  193.     Func    *bios_tab;    /* pointer to the BIOS entry points */
  194.     Func    *dos_tab;    /* pointer to the GEMDOS entry points */
  195.  
  196. /* media change vector */
  197.     void    ARGS_ON_STACK (*drvchng) P_((unsigned));
  198.  
  199. /* Debugging stuff */
  200.     void    ARGS_ON_STACK (*trace) P_((const char *, ...));
  201.     void    ARGS_ON_STACK (*debug) P_((const char *, ...));
  202.     void    ARGS_ON_STACK (*alert) P_((const char *, ...));
  203.     EXITING void ARGS_ON_STACK (*fatal) P_((const char *, ...));
  204.  
  205. /* memory allocation functions */
  206.     void *    ARGS_ON_STACK (*kmalloc) P_((long));
  207.     void    ARGS_ON_STACK (*kfree) P_((void *));
  208.     void *    ARGS_ON_STACK (*umalloc) P_((long));
  209.     void    ARGS_ON_STACK (*ufree) P_((void *));
  210.  
  211. /* utility functions for string manipulation */
  212.     int    ARGS_ON_STACK (*strnicmp) P_((const char *, const char *, int));
  213.     int    ARGS_ON_STACK (*stricmp) P_((const char *, const char *));
  214.     char *    ARGS_ON_STACK (*strlwr) P_((char *));
  215.     char *    ARGS_ON_STACK (*strupr) P_((char *));
  216.     int    ARGS_ON_STACK (*sprintf) P_((char *, const char *, ...));
  217.  
  218. /* utility functions for manipulating time */
  219.     void    ARGS_ON_STACK (*millis_time) P_((unsigned long, short *));
  220.     long    ARGS_ON_STACK (*unixtim) P_((unsigned, unsigned));
  221.     long    ARGS_ON_STACK (*dostim) P_((long));
  222.  
  223. /* utility functions for dealing with pauses, or for putting processes
  224.  * to sleep
  225.  */
  226.     void    ARGS_ON_STACK (*nap) P_((unsigned));
  227.     void    ARGS_ON_STACK (*sleep) P_((int que, long cond));
  228.     void    ARGS_ON_STACK (*wake) P_((int que, long cond));
  229.     void    ARGS_ON_STACK (*wakeselect) P_((long param));
  230.  
  231. /* file system utility functions */
  232.     int    ARGS_ON_STACK (*denyshare) P_((FILEPTR *, FILEPTR *));
  233.  
  234. /* reserved for future use */
  235.     LOCK *    ARGS_ON_STACK (*denylock) P_((LOCK *, LOCK *));
  236.     long    res2[9];
  237. };
  238.  
  239. /* flags for open() modes */
  240. #define O_RWMODE      0x03    /* isolates file read/write mode */
  241. #    define O_RDONLY    0x00
  242. #    define O_WRONLY    0x01
  243. #    define O_RDWR    0x02
  244. #    define O_EXEC    0x03    /* execute file; used by kernel only */
  245.  
  246. /* 0x04 is for future expansion */
  247. #define O_APPEND    0x08    /* all writes go to end of file */
  248.  
  249. #define O_SHMODE    0x70    /* isolates file sharing mode */
  250. #    define O_COMPAT    0x00    /* compatibility mode */
  251. #    define O_DENYRW    0x10    /* deny both read and write access */
  252. #    define O_DENYW    0x20    /* deny write access to others */
  253. #    define O_DENYR    0x30    /* deny read access to others */
  254. #    define O_DENYNONE 0x40    /* don't deny any access to others */
  255.  
  256. #define O_NOINHERIT    0x80    /* private file (not passed to child) */
  257.  
  258. #define O_NDELAY    0x100    /* don't block for i/o on this file */
  259. #define O_CREAT        0x200    /* create file if it doesn't exist */
  260. #define O_TRUNC        0x400    /* truncate file to 0 bytes if it does exist */
  261. #define O_EXCL        0x800    /* fail open if file exists */
  262.  
  263. #define O_USER        0x0fff    /* isolates user-settable flag bits */
  264.  
  265. #define O_GLOBAL    0x1000    /* for opening a global file */
  266.  
  267. /* kernel mode bits -- the user can't set these! */
  268. #define O_TTY        0x2000
  269. #define O_HEAD        0x4000
  270. #define O_LOCK        0x8000
  271.  
  272. /* GEMDOS file attributes */
  273.  
  274. /* macros to be applied to FILEPTRS to determine their type */
  275. #define is_terminal(f) (f->flags & O_TTY)
  276.  
  277. /* lseek() origins */
  278. #define    SEEK_SET    0        /* from beginning of file */
  279. #define    SEEK_CUR    1        /* from current location */
  280. #define    SEEK_END    2        /* from end of file */
  281.  
  282. /* The requests for Dpathconf() */
  283. #define DP_IOPEN    0    /* internal limit on # of open files */
  284. #define DP_MAXLINKS    1    /* max number of hard links to a file */
  285. #define DP_PATHMAX    2    /* max path name length */
  286. #define DP_NAMEMAX    3    /* max length of an individual file name */
  287. #define DP_ATOMIC    4    /* # of bytes that can be written atomically */
  288. #define DP_TRUNC    5    /* file name truncation behavior */
  289. #    define    DP_NOTRUNC    0    /* long filenames give an error */
  290. #    define    DP_AUTOTRUNC    1    /* long filenames truncated */
  291. #    define    DP_DOSTRUNC    2    /* DOS truncation rules in effect */
  292. #define DP_CASE        6
  293. #    define    DP_CASESENS    0    /* case sensitive */
  294. #    define    DP_CASECONV    1    /* case always converted */
  295. #    define    DP_CASEINSENS    2    /* case insensitive, preserved */
  296. #define DP_MAXREQ    6    /* highest legal request */
  297.  
  298. /* Dpathconf and Sysconf return this when a value is not limited
  299.    (or is limited only by available memory) */
  300.  
  301. #define UNLIMITED    0x7fffffffL
  302.  
  303. /* various character constants and defines for TTY's */
  304. #define MiNTEOF 0x0000ff1a    /* 1a == ^Z */
  305.  
  306. /* defines for tty_read */
  307. #define RAW    0
  308. #define COOKED    0x1
  309. #define NOECHO    0
  310. #define ECHO    0x2
  311. #define ESCSEQ    0x04        /* cursor keys, etc. get escape sequences */
  312.  
  313. /* constants for Fcntl calls */
  314. #define F_DUPFD        0        /* handled by kernel */
  315. #define F_GETFD        1        /* handled by kernel */
  316. #define F_SETFD        2        /* handled by kernel */
  317. #    define FD_CLOEXEC    1    /* close on exec flag */
  318.  
  319. #define F_GETFL        3        /* handled by kernel */
  320. #define F_SETFL        4        /* handled by kernel */
  321. #define F_GETLK        5
  322. #define F_SETLK        6
  323. #define F_SETLKW    7
  324.  
  325. /* more constants for various Fcntl's */
  326. #define FSTAT        (('F'<< 8) | 0)        /* handled by kernel */
  327. #define FIONREAD    (('F'<< 8) | 1)
  328. #define FIONWRITE    (('F'<< 8) | 2)
  329. #define TIOCGETP    (('T'<< 8) | 0)
  330. #define TIOCSETP    (('T'<< 8) | 1)
  331. #define TIOCSETN    TIOCSETP
  332. #define TIOCGETC    (('T'<< 8) | 2)
  333. #define TIOCSETC    (('T'<< 8) | 3)
  334. #define TIOCGLTC    (('T'<< 8) | 4)
  335. #define TIOCSLTC    (('T'<< 8) | 5)
  336. #define TIOCGPGRP    (('T'<< 8) | 6)
  337. #define TIOCSPGRP    (('T'<< 8) | 7)
  338. #define TIOCFLUSH    (('T'<< 8) | 8)
  339. #define TIOCSTOP    (('T'<< 8) | 9)
  340. #define TIOCSTART    (('T'<< 8) | 10)
  341. #define TIOCGWINSZ    (('T'<< 8) | 11)
  342. #define TIOCSWINSZ    (('T'<< 8) | 12)
  343. #define TIOCGXKEY    (('T'<< 8) | 13)
  344. #define TIOCSXKEY    (('T'<< 8) | 14)
  345. #define TIOCIBAUD    (('T'<< 8) | 18)
  346. #define TIOCOBAUD    (('T'<< 8) | 19)
  347. #define TIOCCBRK    (('T'<< 8) | 20)
  348. #define TIOCSBRK    (('T'<< 8) | 21)
  349. #define TIOCGFLAGS    (('T'<< 8) | 22)
  350. #define TIOCSFLAGS    (('T'<< 8) | 23)
  351.  
  352. /* cursor control Fcntls:
  353.  * NOTE THAT THESE MUST BE TOGETHER
  354.  */
  355. #define TCURSOFF    (('c'<< 8) | 0)
  356. #define TCURSON        (('c'<< 8) | 1)
  357. #define TCURSBLINK    (('c'<< 8) | 2)
  358. #define TCURSSTEADY    (('c'<< 8) | 3)
  359. #define TCURSSRATE    (('c'<< 8) | 4)
  360. #define TCURSGRATE    (('c'<< 8) | 5)
  361.  
  362. /* process stuff */
  363. #define PPROCADDR    (('P'<< 8) | 1)
  364. #define PBASEADDR    (('P'<< 8) | 2)
  365. #define PCTXTSIZE    (('P'<< 8) | 3)
  366. #define PSETFLAGS    (('P'<< 8) | 4)
  367. #define PGETFLAGS    (('P'<< 8) | 5)
  368. #define PTRACESFLAGS    (('P'<< 8) | 6)
  369. #define PTRACEGFLAGS    (('P'<< 8) | 7)
  370. #    define    P_ENABLE    (1 << 0)    /* enable tracing */
  371. #ifdef NOTYETDEFINED
  372. #    define    P_DOS        (1 << 1)    /* trace DOS calls - unimplemented */
  373. #    define    P_BIOS        (1 << 2)    /* trace BIOS calls - unimplemented */
  374. #    define    P_XBIOS        (1 << 3)    /* trace XBIOS calls - unimplemented */
  375. #endif
  376.  
  377. #define PTRACEGO    (('P'<< 8) | 8)    /* these 4 must be together */
  378. #define PTRACEFLOW    (('P'<< 8) | 9)
  379. #define PTRACESTEP    (('P'<< 8) | 10)
  380. #define PTRACE11    (('P'<< 8) | 11)
  381.  
  382. #define SHMGETBLK    (('M'<< 8) | 0)
  383. #define SHMSETBLK    (('M'<< 8) | 1)
  384.  
  385. /* terminal control constants (tty.sg_flags) */
  386. #define T_CRMOD        0x0001
  387. #define T_CBREAK    0x0002
  388. #define T_ECHO        0x0004
  389. /* #define T_XTABS    0x0008  unimplemented*/
  390. #define T_RAW        0x0010
  391. /* #define T_LCASE    0x0020  unimplemented */
  392.  
  393. #define T_NOFLSH    0x0040        /* don't flush buffer when signals
  394.                        are received */
  395. #define T_TOS        0x0080
  396. #define T_TOSTOP    0x0100
  397. #define T_XKEY        0x0200        /* Fread returns escape sequences for
  398.                        cursor keys, etc. */
  399. /* 0x0400 and 0x0800 still available */
  400. #define T_TANDEM    0x1000
  401. #define T_RTSCTS    0x2000
  402. #define T_EVENP        0x4000        /* EVENP and ODDP are mutually exclusive */
  403. #define T_ODDP        0x8000
  404.  
  405. #define TF_FLAGS    0xF000
  406.  
  407. /* some flags for TIOC[GS]FLAGS */
  408. #define TF_STOPBITS    0x0003
  409. #define TF_1STOP    0x0001
  410. #define TF_15STOP    0x0002
  411. #define    TF_2STOP    0x0003
  412.  
  413. #define TF_CHARBITS    0x000C
  414. #define TF_8BIT        0
  415. #define TF_7BIT        0x4
  416. #define TF_6BIT        0x8
  417. #define TF_5BIT        0xC
  418.  
  419. /* the following are terminal status flags (tty.state) */
  420. /* (the low byte of tty.state indicates a part of an escape sequence still
  421.  * hasn't been read by Fread, and is an index into that escape sequence)
  422.  */
  423. #define TS_ESC        0x00ff
  424. #define TS_HOLD        0x1000        /* hold (e.g. ^S/^Q) */
  425. #define TS_COOKED    0x8000        /* interpret control chars */
  426.  
  427. /* structures for terminals */
  428. struct tchars {
  429.     char t_intrc;
  430.     char t_quitc;
  431.     char t_startc;
  432.     char t_stopc;
  433.     char t_eofc;
  434.     char t_brkc;
  435. };
  436.  
  437. struct ltchars {
  438.     char t_suspc;
  439.     char t_dsuspc;
  440.     char t_rprntc;
  441.     char t_flushc;
  442.     char t_werasc;
  443.     char t_lnextc;
  444. };
  445.  
  446. struct sgttyb {
  447.     char sg_ispeed;
  448.     char sg_ospeed;
  449.     char sg_erase;
  450.     char sg_kill;
  451.     ushort sg_flags;
  452. };
  453.  
  454. struct winsize {
  455.     short    ws_row;
  456.     short    ws_col;
  457.     short    ws_xpixel;
  458.     short    ws_ypixel;
  459. };
  460.  
  461. struct xkey {
  462.     short    xk_num;
  463.     char    xk_def[8];
  464. };
  465.  
  466. struct tty {
  467.     short        pgrp;        /* process group of terminal */
  468.     short        state;        /* terminal status, e.g. stopped */
  469.     short        use_cnt;    /* number of times terminal is open */
  470.     short        res1;        /* reserved for future expansion */
  471.     struct sgttyb     sg;
  472.     struct tchars     tc;
  473.     struct ltchars     ltc;
  474.     struct winsize    wsiz;
  475.     long        rsel;        /* selecting process for read */
  476.     long        wsel;        /* selecting process for write */
  477.     char        *xkey;        /* extended keyboard table */
  478.     long        resrvd[3];    /* for future expansion */
  479. };
  480.  
  481. /* Dcntl constants and types */
  482. #define DEV_NEWTTY    0xde00
  483. #define DEV_NEWBIOS    0xde01
  484. #define DEV_INSTALL    0xde02
  485.  
  486. struct dev_descr {
  487.     DEVDRV    *driver;
  488.     short    dinfo;
  489.     short    flags;
  490.     struct tty *tty;
  491.     long    reserved[4];
  492. };
  493.  
  494.  
  495. /* number of BIOS drives */
  496. #define NUM_DRIVES 32
  497.  
  498. #define BIOSDRV (NUM_DRIVES)
  499. #define PIPEDRV (NUM_DRIVES+1)
  500. #define PROCDRV (NUM_DRIVES+2)
  501. #define SHMDRV    (NUM_DRIVES+3)
  502.  
  503. #define UNI_NUM_DRVS (NUM_DRIVES+4)
  504. #define UNIDRV    ('U'-'A')
  505.  
  506. #define PSEUDODRVS ((1L<<UNIDRV))
  507.  
  508. #define PROC_BASE_DEV 0xA000
  509.  
  510. #ifndef GENMAGIC
  511. /* external variables */
  512.  
  513. extern FILESYS *drives[NUM_DRIVES];
  514. extern struct tty default_tty;
  515. extern char follow_links[];
  516. #endif
  517.  
  518. #endif /* _filesys_h */
  519.